#pragma once
#include<iostream>
using namespace std;
namespace GIS20153
{
	struct point
	{
		double x;
		double y;
	};
	double function2(point arr[], int size)
	{
		double area0 = 0;
		double area1 = 0;
		for (size_t i = 0; i < size-1;i++)
		{
			area0 += arr[i].x * arr[i + 1].y;
			area1 += arr[i].y * arr[i + 1].x;
		}
		area0 += arr[size - 1].x * arr[0].y;
		area1 += arr[size - 1].y * arr[0].x;

		return (area0 - area1) / 2;
	}

	void function1()
	{
		point arr[] = { {4,4},{0,1},{-2,5} ,{-6,0}, {-1,-4}, {5,-2},{4,4} };
		int size = 7;
		cout<<function2(arr, size);

	}

}